<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/12/3
 * Time: 11:36
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\api\controller\v1;

use app\api\controller\Base;
use app\common\business\Performance as BusObj;
use app\common\lib\Show;
use app\common\lib\Status;
use think\App;
use think\Exception;

class Performance extends Base
{
    protected BusObj $busObj;

    public function __construct(App $app)
    {
        $this->busObj = new BusObj();
        parent::__construct($app);
    }
    public function getPerformanceContent(){
        try {
            $lists = $this->busObj->getListData();
        }catch (\Exception $e){
            throw new Exception("查询错误");
        }
        if(empty($lists)){
            return Show::json_show(Status::mini_normal,"没有数据",[]);
        }
        return Show::json_show(Status::mini_normal,"ok",$lists[0]);
    }
}